﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;

public class NetLink : MonoBehaviour
{
    private NetworkManager networkManager;
    void Start()
    {
        networkManager = GetComponent<NetworkManager>();
    }

    // Update is called once per frame
    void Update()
    {
        if(NetState.isNet == true)
        {
            networkManager.StartClient();

        }
        else if(NetState.isNet == false)
        {
            networkManager.StartClient();
        }
        if(NetState.isNet == false)
        {
            networkManager.StopClient();
        }
    }
}
